﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ins = LEET.StandardModules.Instructions;
using LEET.CommonInterfaces.Compilers;
using LEET.LEETCommon;
using LEET.CommonInterfaces.TestControls;

namespace Tedds_Tool.Instructions.Actions
{
    public class Close : Ins.Action
    {
        public Close(String[] args)
            : base(args)
        {
            InstructionType = NodeTypes.CLOSE_ACTION_TYPE;
        }

        public static IAutomationActionResult StaticCall()
        {
            //TODO
            return null;
        }

        public override String RenderStaticCall()
        {
            //TODO
            return "Tedds_Tool.Instructions.Actions.Close.StaticCall()";
        }

        [Obsolete("This should now be replaced by RenderStaticCall", false)]
        protected override String MethodBody(AssertionSet asserts)
        {
            String pattern = "WindowPattern";
            String action = "Close()"; 
            return MethodBody(pattern, action);
        }

        public override string PlainText()
        {
            return "Closed the window we were watching.";
        }
    }
}
